package cn.ggsaas.base.util;

import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import cn.ggsaas.base.enums.DesensitizeEnum;

/**
 * 脱敏方法工具类
 * 信息脱敏工具类
 * @author liyuzhen
 */
@Slf4j
public class DesensitizeUtil {
    public static String desensitize(String value, DesensitizeEnum type) {
        return StrUtil.hide(value, type.getBefore(), value.length()-type.getAfter());
    }
}
